import { MockMethod } from 'vite-plugin-mock';

export default [
  {
    url: /\/api\/menu\/list-tree/,
    method: 'get',
    timeout: 300,
    response: () => {
      return {
        code: 'SUCCESS',
        message: '成功',
        data: [
          {
            list: [{ menuId: 1, menuName: '系统管理', permission: '', menuType: 'DIR', parentId: 0, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 2, menuName: '用户管理', permission: 'user:query', menuType: 'PAGE', parentId: 1, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-05 15:14:50', children: [{ menuId: 5, menuName: '用户新增', permission: 'user:add', menuType: 'BTN', parentId: 2, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-06 16:28:39', menuTypeLabel: '按钮', }, { menuId: 6, menuName: '用户删除', permission: 'user:delete', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 7, menuName: '用户编辑', permission: 'user:edit', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 8, menuName: '重置密码', permission: 'user:reset', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 3, menuName: '角色管理', permission: 'role:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 9, menuName: '角色新增', permission: 'role:add', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 10, menuName: '角色删除', permission: 'role:delete', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 11, menuName: '角色编辑', permission: 'role:edit', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 4, menuName: '菜单管理', permission: 'menu:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 12, menuName: '菜单新增', permission: 'menu:add', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 13, menuName: '菜单删除', permission: 'menu:delete', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 14, menuName: '菜单编辑', permission: 'menu:edit', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', },], menuTypeLabel: '目录', }, { menuId: 2, menuName: '用户管理', permission: 'user:query', menuType: 'PAGE', parentId: 1, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-05 15:14:50', children: [{ menuId: 5, menuName: '用户新增', permission: 'user:add', menuType: 'BTN', parentId: 2, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-06 16:28:39', menuTypeLabel: '按钮', }, { menuId: 6, menuName: '用户删除', permission: 'user:delete', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 7, menuName: '用户编辑', permission: 'user:edit', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 8, menuName: '重置密码', permission: 'user:reset', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 3, menuName: '角色管理', permission: 'role:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 9, menuName: '角色新增', permission: 'role:add', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 10, menuName: '角色删除', permission: 'role:delete', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 11, menuName: '角色编辑', permission: 'role:edit', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 4, menuName: '菜单管理', permission: 'menu:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 12, menuName: '菜单新增', permission: 'menu:add', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 13, menuName: '菜单删除', permission: 'menu:delete', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 14, menuName: '菜单编辑', permission: 'menu:edit', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 5, menuName: '用户新增', permission: 'user:add', menuType: 'BTN', parentId: 2, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-06 16:28:39', menuTypeLabel: '按钮', }, { menuId: 6, menuName: '用户删除', permission: 'user:delete', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 7, menuName: '用户编辑', permission: 'user:edit', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 8, menuName: '重置密码', permission: 'user:reset', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 9, menuName: '角色新增', permission: 'role:add', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 10, menuName: '角色删除', permission: 'role:delete', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 11, menuName: '角色编辑', permission: 'role:edit', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 12, menuName: '菜单新增', permission: 'menu:add', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 13, menuName: '菜单删除', permission: 'menu:delete', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 14, menuName: '菜单编辑', permission: 'menu:edit', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },],
            tree: [{ menuId: 1, menuName: '系统管理', permission: '', menuType: 'DIR', parentId: 0, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 2, menuName: '用户管理', permission: 'user:query', menuType: 'PAGE', parentId: 1, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-05 15:14:50', children: [{ menuId: 5, menuName: '用户新增', permission: 'user:add', menuType: 'BTN', parentId: 2, version: 2, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-09-06 16:28:39', menuTypeLabel: '按钮', }, { menuId: 6, menuName: '用户删除', permission: 'user:delete', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 7, menuName: '用户编辑', permission: 'user:edit', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 8, menuName: '重置密码', permission: 'user:reset', menuType: 'BTN', parentId: 2, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 3, menuName: '角色管理', permission: 'role:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 9, menuName: '角色新增', permission: 'role:add', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 10, menuName: '角色删除', permission: 'role:delete', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 11, menuName: '角色编辑', permission: 'role:edit', menuType: 'BTN', parentId: 3, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', }, { menuId: 4, menuName: '菜单管理', permission: 'menu:query', menuType: 'PAGE', parentId: 1, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', children: [{ menuId: 12, menuName: '菜单新增', permission: 'menu:add', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 13, menuName: '菜单删除', permission: 'menu:delete', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', }, { menuId: 14, menuName: '菜单编辑', permission: 'menu:edit', menuType: 'BTN', parentId: 4, version: 0, deleted: false, createTime: '2023-08-10 17:13:41', updateTime: '2023-08-10 17:13:41', menuTypeLabel: '按钮', },], menuTypeLabel: '页面', },], menuTypeLabel: '目录', },],
          },
        ],
        total: 1,
      };
    },
  },
  {
    url: '/api/menu',
    method: 'post',
    timeout: 300,
    response: () => {
      return {
        code: 'SUCCESS',
        message: '成功',
      };
    },
  },
  {
    url: '/api/menu/delete',
    method: 'post',
    timeout: 300,
    response: () => {
      return {
        code: 'SUCCESS',
        message: '成功',
      };
    },
  },
  {
    url: '/api/menu',
    method: 'put',
    timeout: 300,
    response: () => {
      return {
        code: 'SUCCESS',
        message: '成功',
      };
    },
  },
] as MockMethod[];
